// 页面加载后插入导航栏和页脚
document.addEventListener("DOMContentLoaded", function () {
  const header = `
    <header class="navbar">
      <div class="container">
        <h2>🎓 在线考试系统</h2>
        <nav>
          <a href="index.html">首页</a>
          <a href="examList.html">考试列表</a>
          <a href="records.html">考试记录</a>
          <a href="wrongQuestions.html">错题本</a>
          <a href="profile.html">个人中心</a>
        </nav>
      </div>
    </header>
  `;

  const footer = `
    <footer class="footer">
      <p>2025 © 在线考试系统 | SongYl 版权所有</p>
    </footer>
  `;

  document.body.insertAdjacentHTML("afterbegin", header);
  document.body.insertAdjacentHTML("beforeend", footer);
});
